

<template>
  <el-dialog v-model="dialogTableVisible"
             title="审核流程"
             :close-on-click-modal="false"
             width="80%">
         <div>
           <jfwbDetails ref="RefauditjfwnDetails"></jfwbDetails>
         </div>
          <div>
            <Checkcomponents :procInsId="procInsId" @success="success" class="mt-[10px]" />
          </div>
<!--    <div>-->
<!--      <Checkcomponents :procInsId="procInsId" class="mt-[10px]" />-->
<!--    </div>-->
  </el-dialog>
</template>
<script setup lang="ts">
import jfwbDetails from './jfwb/auditjfwbDetails.vue';
import Checkcomponents from "@/views/flowable/processInstance/detail/components.vue";
import {ElMessage} from "element-plus";
const procInsId = ref('')
const dialogTableVisible = ref(false)
const RefauditjfwnDetails = ref(null)


const openaudit = function (row){
  if(row.processInstanceId == null){
    ElMessage({
      message: 'processInstanceId为空',
      type: "error"
    });
    return
  }
  dialogTableVisible.value = true
  console.log(row)
  //RefauditjfwnDetails.value.opencompileDialog(row.id)
  procInsId.value = row.processInstanceId
  nextTick(() => {
    RefauditjfwnDetails.value.opencompileDialog(row.id);
  });
}
const emit = defineEmits(['success'])
const success = function (){
  dialogTableVisible.value = false
  emit('success')
}
// 暴露 openDialog 方法供父组件调用
defineExpose({
  openaudit
});
</script>
<style scoped lang="scss">

</style>